Açtırdığım sayfadaki kodlar bunlar
[code]
public class MainActivity extends Activity {
short a = 1000;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button btnArtirM = (Button) findViewById(R.id.btnArtir);
Button btnArtirM2 = (Button) findViewById(R.id.btnSifirla);
Button btntoMain = (Button) findViewById(R.id.btntoMain);
initTypeface();
btnArtirM.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
short sonuc = (short) (a - 1);
TextView Gosterge = (TextView) findViewById(R.id.txtGosterge);
Gosterge.setGravity(Gravity.CENTER_VERTICAL
| Gravity.CENTER_HORIZONTAL);
Gosterge.setText(String.valueOf(sonuc));
a = (short) (a - 1);
}
});
btnArtirM2.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
alertMessage();
}
});
btntoMain.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
finish();
}
});
}
[/code]